#ifndef JX_UART_SEND_H_
#define JX_UART_SEND_H_

#ifdef __cplusplus
extern "C"
{
#endif

// 串口发送消息最大长度
#define UART_SEND_MAX 32
#define UART_MSG_HEAD_LEN 2
#define UART_MSG_FOOT_LEN 2

// 串口发送消息号
#define U_MSG_PoAlreadyStart 1
#define U_MSG_PoAlreadyStop 2
#define U_MSG_PoFinishTimes 3
#define U_MSG_PCStateIsOpen 4
#define U_MSG_PCStateIsShut 5
#define U_MSG_PlayNowHoursMin 6
#define U_MSG_PlayNowYearsMou 7
#define U_MSG_PlayTemp 8
#define U_MSG_PlayHumi 9
#define U_MSG_PlayTempHumi 10
#define U_MSG_PlayBootCount 11
#define U_MSG_PlayPomoCount 12

  // 串口消息参数类型
  typedef union
  {
    double d_double;
    int d_int;
    unsigned char d_ucs[8];
    char d_char;
    unsigned char d_uchar;
    unsigned long d_long;
    short d_short;
    float d_float;
  } uart_param_t;

  // action: PoAlreadyStart
  void _uart_PoAlreadyStart();

  // action: PoAlreadyStop
  void _uart_PoAlreadyStop();

  // action: PoFinishTimes
  void _uart_PoFinishTimes(int po_finish_times);

  // action: PCStateIsOpen
  void _uart_PCStateIsOpen();

  // action: PCStateIsShut
  void _uart_PCStateIsShut();

  // action: PlayNowHoursMin
  void _uart_PlayNowHoursMin(char hours, char minutes);

  // action: PlayNowYearsMou
  void _uart_PlayNowYearsMou(int years, char m, char d, char week);

  // action: PlayTemp
  void _uart_PlayTemp(char temp);

  // action: PlayHumi
  void _uart_PlayHumi(char humi);

  // action: PlayTempHumi
  void _uart_PlayTempHumi(char temp, char humi);

  // action: PlayBootCount
  void _uart_PlayBootCount(int boot_count);

  // action: PlayPomoCount
  void _uart_PlayPomoCount(int pomo_count);

#ifdef __cplusplus
}
#endif

#endif /*JX_UART_SEND_H_*/
